<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="/page/share/taglib.jsp" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">

    <title>血液制品信息列表</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <style type="text/css">
        .a {
            text-decoration: none;
            font-family: '微软雅黑', serif;
            display: block;
            width: 200px;
            height: 30px;
            cursor: pointer;
            border: none;
            background: #114a93;
            color: white;
            font-size: 16px;
            padding: 4px 20px 0 20px;
            margin: 2px auto;
        }
    </style>
    <script language="JavaScript" type="text/javascript">
        function topage(page) {
            var form = document.getElementById("myform");
            document.getElementById("page")
                    .setAttribute("value", page);
            form.submit();
        }

    </script>

</head>

<body style="background:url(<%=basePath%>/background.jpg) repeat-x 40px -40px">
<span style="font-family: '微软雅黑',serif;font-size: 30px">血液制品信息列表</span>
<hr/>
<div style="float:left;margin: 120px auto;">
<a href="<%=basePath%>page/bloodBank/addBlood.jsp" class="a" onMouseOver="this.style.background='#2569c1'"
   onmouseout="this.style.background='#114a93'">血液制品信息录入</a>
<a href="<%=basePath%>BloodBank!loadAllBlood.action?redirect=review" class="a" onMouseOver="this.style.background='#2569c1'"
   onmouseout="this.style.background='#114a93'">血液制品信息审核</a>
<a href="<%=basePath%>BloodBank!loadAllBlood.action?redirect=overdue" class="a" onMouseOver="this.style.background='#2569c1'"
   onmouseout="this.style.background='#114a93'">血液制品信息报废</a>
    <a href="<%=basePath%>index.jsp" class="a" onMouseOver="this.style.background='#2569c1'"
   onmouseout="this.style.background='#114a93'">返回主页</a>
</div>
<form action="BloodBank!loadAllBlood.action" method="post" id="myform">
    <table style="margin: 120px auto;background: #114a93; opacity:0.9;font-family: '微软雅黑',serif;color: linen;width:
    1000px;">
        <tr>
            <td colspan="9" bgcolor="gray" align="right">
                <%@ include file="/page/share/fenye.jsp" %>
            </td>
        </tr>
        <tr style="">
            <td>血型</td>
            <td>品种</td>
            <td>献血量</td>
            <td>献血时间</td>
            <td>采血单位</td>
            <td>献血人</td>
            <td>采血人</td>
            <td>到期时间</td>
            <td>状态</td>
        </tr>
        <s:iterator value="pageView.records" var="bloodBank">
            <tr>
                <td>${bloodBank.bloodType.bloodType}</td>
                <td>${bloodBank.bloodName.bloodName}</td>
                <td>${bloodBank.bloodVolume}</td>
                <td>${bloodBank.bloodDate}</td>
                <td>${bloodBank.department}</td>
                <td>${bloodBank.bloodPerson}</td>
                <td>${bloodBank.bloodCollection}</td>
                <td>${bloodBank.overdue}</td>
                <td>
                    <s:if test="#bloodBank.state==0">
                        未审核
                    </s:if>
                    <s:elseif test="#bloodBank.state==1">
                        未使用
                    </s:elseif>
                    <s:elseif test="#bloodBank.state==2">
                        已使用
                    </s:elseif>
                    <s:else>
                        已报废
                    </s:else>
                </td>
            </tr>
        </s:iterator>
    </table>
</form>

</body>
</html>
